Pod::Spec.new do |s|
    s.name     = 'AFNetworking_ilongge'
    s.version  = '4.1.0'
    s.license  = 'MIT'
    s.summary  = 'A delightful networking framework for Apple platforms.'
    s.homepage = 'https://gitee.com/ilongge/afnetworking'
    s.authors  = { 'ilongge' => '1015820857@qq.com' }
    s.source   = { :git => 'https://gitee.com/ilongge/afnetworking.git', :tag => s.version }
    
    s.ios.deployment_target = '11.0'
    
    s.ios.pod_target_xcconfig = {
        'ARCHS[sdk=iphonesimulator*]' => '$(ARCHS_STANDARD_64_BIT)',
        'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'
    }
    
    s.user_target_xcconfig = {
        'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64',
        'GENERATE_INFOPLIST_FILE' => 'YES'
    }
    
    s.source_files = 'AFNetworking/AFNetworking.h'
    
    s.subspec 'Serialization' do |ss|
        ss.source_files = 'AFNetworking/AFURL{Request,Response}Serialization.{h,m}'
    end
    
    s.subspec 'Security' do |ss|
        ss.source_files = 'AFNetworking/AFSecurityPolicy.{h,m}'
    end
    
    s.subspec 'Reachability' do |ss|
        ss.ios.deployment_target = '11.0'
        ss.osx.deployment_target = '11.0'
        ss.source_files = 'AFNetworking/AFNetworkReachabilityManager.{h,m}'
    end
    
    s.subspec 'NSURLSession' do |ss|
        ss.dependency 'AFNetworking_ilongge/Serialization'
        ss.ios.dependency 'AFNetworking_ilongge/Reachability'
        ss.osx.dependency 'AFNetworking_ilongge/Reachability'
        ss.dependency 'AFNetworking_ilongge/Security'
        ss.source_files = 'AFNetworking/AF{URL,HTTP}SessionManager.{h,m}', 'AFNetworking/AFCompatibilityMacros.h'
    end
    
    s.subspec 'UIKit' do |ss|
        ss.ios.deployment_target = '11.0'
        ss.dependency 'AFNetworking_ilongge/NSURLSession'
        ss.source_files = 'UIKit+AFNetworking/*.{h,m}'
    end
end
